<%@page pageEncoding="UTF-8" isELIgnored="false" session="false"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@taglib prefix="f" uri="http://www.slim3.org/functions"%>

<!DOCTYPE html>
<html lang="ja">
  <head>
    <meta charset="utf-8">
    <title>小さな団欒場</title>
    <meta name="description" content="">
    <meta name="author" content="">
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
    <script src="/js/lib/bootstrap-dropdown.js"></script>
    <script src="/js/lib/underscore-min.js"></script>
    <script src="/js/bbs/bbs.js"></script>

    <!-- Le styles -->
    <link rel="stylesheet" href="http://twitter.github.com/bootstrap/1.3.0/bootstrap.min.css">
    <link rel="stylesheet" href="/css/smallreunion.css">
    <style type="text/css">
      body {
        padding-top: 60px;
      }
    </style>

    <link rel="alternate" type="application/rss+xml" title="RSS 1.0" href="/bbs/feed/10">
    <link rel="alternate" type="application/rss+xml" title="RSS 2.0" href="/bbs/feed/20">
  </head>
  <body>
    <jsp:include page="/common/menu.jsp" flush="true" />

    <div class="container-fluid">
      <div class="ex-sidebar">
        <div class="well">
          <h5>RSS</h5>
          <ul>
            <li><a href="/bbs/feed/10">RSS1.0</a></li>
            <li><a href="/bbs/feed/20">RSS2.0</a></li>
          </ul>
        </div>
      </div>
      <div class="ex-content">
        <div>
          <form method="post" action="/bbs/entry">
            <textarea class="xxlarge" name="content" id="content" rows="3" ${loginViewHelper.enabled}></textarea>
            <button type="submit" class="btn primary right" ${loginViewHelper.enabled}>投稿</button>
          </form>
        </div>
        <c:if test="${loginViewHelper.enabled == 'disabled'}">
          <h5>投稿するためには<a href="/authntication/">ログイン</a>して下さい。</h5>
        </c:if>
        <div id="twitter-bbspost-list">
          <c:forEach var="e" items="${bbsPostList}">
            <div class="twitter-bbspost">
              <div class="twitter-profile-image">
                <a href="#">
                  <img height="48" width="48" class="thumbnail" src="${f:url(e.twitterProfileImageUrl)}" alt="twitterProfileImage">
                </a>
              </div>
              <div class="twitter-bbspost-body">
                <div class="twitter-screen-name">
                  <a href="http://twitter.com/${f:h(e.twitterScreenName)}" target="_blank">
                    ${f:h(e.twitterScreenName)}
                  </a>
                </div>
                <div class="twitter-name">
                  ${f:h(e.twitterName)}
                </div>
                <div class="twitter-entrydate">
                  ${e.viewEntryDate}
                </div>
                <div class="twitter-content">
                  ${e.viewContent}
                </div>
                <div class="twitter-tools">
                  <a href="#">Reply</a>
                  <a href="#" >Delete</a>
                </div>
              </div>
            </div>
          </c:forEach>
        </div>
        <c:if test="${hasNext}">
          <div class="actions">
            <button class="btn" id="readMoreButton">もっと読む</button>
          </div>
        </c:if>
        <input type="hidden" id="cursor" value="${cursor}" />
        <jsp:include page="/common/footer.jsp" flush="true" />
      </div>
    </div>
  </body>
</html>
